﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class groupIndex : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //检查有没有登录
        if (Request.Cookies["userID"] == null)
        {
            Response.Redirect("notLogin.html", true);
            return;
        }
        else if (Request.QueryString["groupID"] == null || Request.QueryString["groupName"] == null)
        {
            //检查GET参数是否完整
            Response.Redirect("noGETParameter.html", true);
            return;
        }
        else
        {
            string groupID = Request.QueryString["groupID"];
            string groupName = Request.QueryString["groupName"];

            Response.Cookies.Set(new HttpCookie("groupID", groupID));
            Response.Cookies.Set(new HttpCookie("groupName", groupName));
        }
    }
}